package org.dxy.domain.event.workstation;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Value;
import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

import java.util.List;

/**
 * 事件：工位分配设备
 * <p>表示设备与工位重新建立绑定关系。</p>
 */
@Value
@Builder
@AllArgsConstructor
public class WorkstationAssignedDevicesEvent implements DomainEvent {

    /**
     * 工位 ID
     */
    Long workstationId;

    /**
     * 分配的设备 ID 列表
     */
    List<Long> assignedDeviceIds;

    @Override
    public Long aggregateId() {
        return workstationId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.WORKSTATION.getKey();
    }
    
    @Override
    public String eventType() {
        return null;
//        return WorkstationEventTypeEnum.DEVICES_ASSIGNED.getKey();
    }
}

